# kishor8dm@gmail.com
# This is the root file. For the moment this is specific to linux and might 
# create problems in windows.
cmake_minimum_required (VERSION 2.6)

# This is here to suppress warnings for missing CMakeLists.txt.
cmake_policy(SET CMP0014 OLD)

project(RSIM)

# include OpenGL and GLUT - required for graphics
find_package(GLUT)
find_package(OpenGL)

# Set the c++ compiler to g++ 
# (kdb: This line will create problems on windows)
set(CMAKE_CXX_COMPILER "g++")

# All .a file are copied into CMAKE_SOURCE_DIR/lib
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${RSIM_SOURCE_DIR}/lib)
set(LIBDIR ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY})

# Set Compiler Flags
set(CMAKE_BUILD_TYPE debug)
set(CMAKE_CXX_FLAGS "-pedantic -Wall -Wconversion -DRSIM_VERBOSE -DRSIM_SAFE")

# Copy blender files to build directory
file(COPY ${RSIM_SOURCE_DIR}/src/graphics/blender DESTINATION ${RSIM_SOURCE_DIR}/build-linux/) 

# Set the path of the executable
set(EXECUTABLE_OUTPUT_PATH ${RSIM_SOURCE_DIR}/build-linux)

add_subdirectory (src)
add_subdirectory (main)
